package com.spsoft.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.spsoft.system.entity.NvatSxcpbXinhua;
import com.spsoft.system.mapper.NvatSxcpbXinhuaMapper;
import com.spsoft.system.service.NvatSxcpbXinhuaService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 寿险产品表 服务实现类
 * </p>
 *
 * @author dingchengyun
 * @since 2024-04-25
 */
@Service
public class NvatSxcpbXinhuaServiceImpl extends ServiceImpl<NvatSxcpbXinhuaMapper, NvatSxcpbXinhua> implements NvatSxcpbXinhuaService {

    @Override
    public NvatSxcpbXinhua getByCpbm(String cpbm) {
        LambdaQueryWrapper<NvatSxcpbXinhua> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(NvatSxcpbXinhua::getSfyx, "1")
                .eq(NvatSxcpbXinhua::getCpbm, cpbm);

        return this.getOne(wrapper);
    }
}
